home *** CD-ROM | disk | FTP | other *** search
- Sear.Doc (c)Cybanim 9 Oct 1993
-
- SEAR.EXE is a search program that looks for a string in a file or files.
- It is written to replace or supplement GREP.COM.
-
- Usage:
-
- SEAR -options target filespec
-
- Searches filespec for target.
-
- target is a string, optionally enclosed in double quotes.
- filespec is a file name, with optional wild characters * ?
- If filespec starts with @ it is a list of files to search
-
- SEAR does not have "Regular Expression" options like GREP
- The only options are:
- l display filenames only (default = display 79 chars around a find)
- i case insensitive (default = case sensitive )
- d examine sub directories (default = current directory only)
- options are entered -lid or -l -d -i or /lid or /l /i /d
-
- version 1.3: searches files bigger than 64K
- searches subdirectories if wild character in filename
-
-
- I wrote SEAR because GREP has two weak points:
- 1) GREP is line oriented, it may not display results from non-text files.
- SEAR can search any file, it displays the results on one line per find
- with the target at column 40 and non-printable characters replaced with
- a dot. This is useful for some files with text contents but non-standard
- line formats, eg database and PCO files.
- 2) GREP can only examine a list of files if they are on the command line.
- SEAR can examine a list of files in a textfile
- eg SEAR target @filist.tmp looks at all the files in a filist.tmp.
- SEAR is designed to examine the output of GREP.
- If the files from GREP are output to a list via:
- GREP -o target filespec >filist.tmp
- filist.tmp contains one line for each file where target was found
- SEAR targetb @filist.tmp will examine all the files in filist.tmp.
-
- SEAR uses the Boyer-Moore Search Algorithm described in
- "Algorithms" by Robert Sedgewick 2ed 1989 Addison-Wesley (page 287)
- SEAR.EXE is copyright Cybanim Pty Ltd 9 Oct 1993
- If SEAR.EXE is not modified and not charged for it may be copied and
- distributed and used without fee.
-
- Updates:
- Ver 1.3 searches large files (previous versions only searched files < 64K )
- searches sub-directories with wild-characters in file name.
-
- Christopher T Skinner
- Cybanim Pty Ltd
- 4/29B Nelson St Woollahra NSW 2025 Australia
- tel(02)3635884 Compuserve 100033,132 100033.132@compuserve.com